Custom dtype - bf16/fp16 support - #1175
Open
asmigosw wants to merge 21 commits into
Open
Conversation
asmigosw
marked this pull request as draft
July 11, 2026 17:36
Signed-off-by: Asmita Goswami <asmigosw@qti.qualcomm.com>
Signed-off-by: Asmita Goswami <asmigosw@qti.qualcomm.com>
Signed-off-by: Asmita Goswami <asmigosw@qti.qualcomm.com>
Signed-off-by: Asmita Goswami <asmigosw@qti.qualcomm.com>
Signed-off-by: Asmita Goswami <asmigosw@qti.qualcomm.com>
Signed-off-by: Asmita Goswami <asmigosw@qti.qualcomm.com>
Signed-off-by: Asmita Goswami <asmigosw@qti.qualcomm.com>
asmigosw
force-pushed
the
custom_dtype_support
branch
from
August 27, 2026 07:29
15f458c to
4fbfbdd
Compare
Signed-off-by: Asmita Goswami <asmigosw@qti.qualcomm.com>
asmigosw
marked this pull request as ready for review
August 27, 2026 16:21
Signed-off-by: asmigosw <asmigosw@qti.qualcomm.com>
Signed-off-by: Asmita Goswami <asmigosw@qti.qualcomm.com>
Signed-off-by: Asmita Goswami <asmigosw@qti.qualcomm.com>
Contributor
Author
|
CI-ready |
ochougul
reviewed
Sep 9, 2026
Comment on lines
+1290
to
+1296
| model_in_bfloat16 = hasattr(self, "config") and (self.config.torch_dtype == torch.bfloat16) | ||
| io_name_prefix = ("past_", "pixel_values", "conv_", "recurrent_") | ||
| pkv_in_bfloat16 = (custom_io is not None) and any( | ||
| any(bfloat16_io_name in key for bfloat16_io_name in io_name_prefix) and "bfloat16" in value | ||
| for key, value in custom_io.items() | ||
| ) | ||
|
|
Contributor
There was a problem hiding this comment.
what is this doing? its not used anywhere?
Contributor
Author
There was a problem hiding this comment.
It is being used at line 1303, it is required for custom_io is case bf16 is passed as dtype.
Contributor
There was a problem hiding this comment.
isn't this already happening on line 1193, why duplicate here? maybe do changes there itself?
ochougul
requested changes
Sep 9, 2026
Signed-off-by: Asmita Goswami <asmigosw@qti.qualcomm.com>
Contributor
|
CI-Ready |
Signed-off-by: Asmita Goswami <asmigosw@qti.qualcomm.com>
ochougul
approved these changes
Sep 11, 2026
Contributor
Author
|
CI-Ready |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Custom dtype support added for models: